home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinME Start Menu 1.xpl < prev    next >
Text File  |  2002-01-01  |  3KB  |  117 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Start menu\Windows ME"
  5. "NAME"="Visible Items"
  6. "VERSION"="2.00"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="00001"
  9. "TEXT 1"="Aha! You can't see this!"
  10. "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the Start menu."
  11. "DESCRIPTION 2"="NOTE #1: Hiding the Run option will not disable the WINDOWS+R key combination, so users will still be able to access the Run command."
  12. "DESCRIPTION 3"="NOTE #2: Show "Log Off <username>" might not work if IE 5 is installed. Also, disabling this option will disable the SHUTDOWN button in the CTRL+ALT+DEL menu.
  13. "AUTHOR"="Xteq Systems (Neil R. Turner)"
  14. "CONTACTURL"="http://www.xteq.com/"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="Thanks to Jon-Roar Selenius [jseleniu@online.no] for spotting the "Recent Documents always empty" bug."
  17.  
  18.  
  19.  sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  20. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
  21.  
  22. sV1=sP2 & "StartMenuFavorites"
  23. sV2=sP & "NoRecentDocsMenu"
  24. sV3=sP2 & "StartMenuRun" '<>!
  25. sV4=sP & "NoClose"
  26. sV5=sP & "NoFind"
  27. sV6=sP2 & "StartMenuLogoff" '<>!
  28. sV7=sP & "NoSMHelp"
  29.  
  30.  
  31. SUB Plugin_Initialize
  32.  Call SetUIElement(1,"Favorites")
  33.  Call ReadIt_2(1,sV1)
  34.  
  35.  Call SetUIElement(2,"Documents")
  36.  Call ReadIt(2,sV2)
  37.  
  38.  Call SetUIElement(3,"Run...")
  39.  Call ReadIt_2(3,sV3)
  40.  
  41.  Call SetUIElement(4,"Shut Down...")
  42.  Call ReadIt(4,sV4)
  43.  
  44.  Call SetUIElement(5,"Search") 
  45.  Call ReadIt(5,sV5)
  46.  
  47.  Call SetUIElement(6,"Log Off <username>...")
  48.  Call ReadIt_2(6,sV6)
  49.  
  50.  Call SetUIElement(7,"Help")
  51.  Call ReadIt(7,sV7)
  52. END SUB
  53.  
  54. 'Called when the Plugin should apply the changes
  55. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  56.  Call WriteIt_2(1,sV1)
  57.  Call WriteIt(2,sV2)
  58.  Call WriteIt_2(3,sV3)
  59.  Call WriteIt(4,sV4)
  60.  Call WriteIt(5,sV5)
  61.  Call WriteIt_2(6,sV6)
  62.  Call WriteIt(7,sV7)
  63.  
  64.  
  65.  Call IndicateSettingChange()
  66. END SUB
  67.  
  68. Sub ReadIt(ITM,PATH1)
  69.  if RegValueExists(PATH1)=false then 'setting available?
  70.     'no setting -> item visible
  71.     Call SetUIElementEx(ITM,true)
  72.  else
  73.     i=RegReadValue(PATH1)
  74.     if i=0 then 
  75.        Call SetUIElementEx(ITM,true)
  76.     end if
  77.  end if
  78. End Sub
  79.  
  80. Sub ReadIt_2(ITM,PATH1)
  81.  if RegValueExists(PATH1)=false then 'setting available?
  82.     'no setting -> item not visible
  83.     Call SetUIElementEx(ITM,false)
  84.  else
  85.     i=RegReadValue(PATH1)
  86.     if i=1 then 
  87.        Call SetUIElementEx(ITM,true)  
  88.     end if
  89.  end if
  90. End Sub
  91.  
  92.  
  93. Sub WriteIt(ITM,PATH1)
  94.  b=GetUIElementEx(ITM)
  95.  if b=true then
  96.  
  97.     s=RegReadValue(PATH1)
  98.     if IsEmpty(s)=false then
  99.        Call RegDeleteValue(PATH1)
  100.     end if
  101.  
  102.  else
  103.     Call RegWriteValue(PATH1,1,2)
  104.  end if
  105. End Sub
  106.  
  107. Sub WriteIt_2(ITM,PATH1)
  108.  b=GetUIElementEx(ITM)
  109.  if b=true then
  110.     Call RegWriteValue(PATH1,1,2)
  111.  else
  112.     Call RegWriteValue(PATH1,0,2)
  113.  end if
  114. End Sub
  115. SUB Plugin_Terminate
  116. END SUB
  117.